<%@ page import="myoa.Company" %>
<html>
<head>
    <meta name="layout" content="freshmade">
    <title>MyOA - Employee - Create</title>
</head>

<body>
<div id="content-wrapper">
    <div class="center-wrapper">
        <div class="content">
            <div id="main">
                <div class="post">
                    <div class="post-title">
                        <h1><g:message code="employee.info"/></h1>
                        <g:message code="employee.info.create"/>
                        <g:render template="/template/messageBar"/>
                    </div>

                    <div class="post-date">
                        <g:render template="/template/createdBy1"/>
                    </div>
                </div>

                <g:form action="save" method="post">
                    <div id="myform">
                        <div class="field">
                            <div class="key"><g:message code="company.name"/></div>

                            <div class="value">
                                <g:if test="${company}">
                                    <g:hiddenField name="createFromCompanyPage" value="true"/>
                                    <g:hiddenField name="company.id" value="${company.id}"/>
                                    <div class="createfrom">${company.name}</div>
                                </g:if>
                                <g:else>
                                    <g:select name="company.id" from="${Company.list()}"
                                              optionKey="id" optionValue="name" value="${employee?.company}"/>
                                </g:else>
                            </div>

                            <div class="clear"></div>
                        </div>

                        <div class="field">
                            <div class="key"><g:message code="employee.name"/></div>

                            <div class="value">
                                <g:textField name="name" value="${employee?.name}"/>
                            </div>

                            <div class="hint">建议用中文全称；不知道全称的，技术人员用“x工”、非技术用“x总”</div>


                            <div class="clear"></div>
                        </div>

                        <div class="field">
                            <div class="key"><g:message code="employee.tel"/></div>

                            <div class="value">
                                <g:textField name="tel" value="${employee?.tel}"/>
                            </div>

                            <div class="hint">多个电话号码请用 | 隔开</div>

                            <div class="clear"></div>
                        </div>

                        <div class="field">
                            <div class="key"><g:message code="employee.email"/></div>

                            <div class="value">
                                <g:textField name="email" value="${employee?.email}"/>
                            </div>

                            <div class="hint">多个Email请用 | 隔开</div>

                            <div class="clear"></div>
                        </div>

                        <div class="buttonbar">
                            <input type="submit" class="button" value="Submit"/>
                            <input type="reset" class="button" value="Reset"/>
                        </div>
                    </div>
                </g:form>
            </div>
        </div>

    </div>
</div>
</body>
</html>